.class public final Lcn/cheln/support/a/a;
.super Ljava/lang/Object;


# instance fields
.field private a:Lcn/cheln/support/a/b;

.field private b:I


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public constructor <init>(I)V
    .locals 0

    invoke-direct {p0}, Lcn/cheln/support/a/a;-><init>()V

    iput p1, p0, Lcn/cheln/support/a/a;->b:I

    return-void
.end method

.method private a(Landroid/text/SpannableStringBuilder;II)Z
    .locals 2

    if-nez p2, :cond_0

    if-eqz p3, :cond_1

    :cond_0
    if-le p2, p3, :cond_2

    :cond_1
    const/4 v0, 0x0

    :goto_0
    return v0

    :cond_2
    new-instance v0, Landroid/text/style/ForegroundColorSpan;

    iget v1, p0, Lcn/cheln/support/a/a;->b:I

    invoke-direct {v0, v1}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V

    const/16 v1, 0x21

    invoke-virtual {p1, v0, p2, p3, v1}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V

    iget-object v0, p0, Lcn/cheln/support/a/a;->a:Lcn/cheln/support/a/b;

    invoke-virtual {v0}, Lcn/cheln/support/a/b;->c()V

    const/4 v0, 0x1

    goto :goto_0
.end method


# virtual methods
.method public final a(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;)Landroid/text/SpannableStringBuilder;
    .locals 8

    const/4 v4, 0x0

    const/4 v6, 0x1

    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    new-instance v1, Landroid/text/SpannableStringBuilder;

    invoke-direct {v1, v0}, Landroid/text/SpannableStringBuilder;-><init>(Ljava/lang/CharSequence;)V

    iget-object v2, p0, Lcn/cheln/support/a/a;->a:Lcn/cheln/support/a/b;

    invoke-virtual {v2, v0, p2}, Lcn/cheln/support/a/b;->a(Ljava/lang/String;Ljava/lang/String;)Z

    iget-object v2, p0, Lcn/cheln/support/a/a;->a:Lcn/cheln/support/a/b;

    invoke-virtual {v2}, Lcn/cheln/support/a/b;->a()I

    move-result v2

    iget-object v3, p0, Lcn/cheln/support/a/a;->a:Lcn/cheln/support/a/b;

    invoke-virtual {v3}, Lcn/cheln/support/a/b;->b()I

    move-result v3

    invoke-direct {p0, v1, v2, v3}, Lcn/cheln/support/a/a;->a(Landroid/text/SpannableStringBuilder;II)Z

    move-result v2

    if-eqz v2, :cond_0

    move-object v0, v1

    :goto_0
    return-object v0

    :cond_0
    iget-object v2, p0, Lcn/cheln/support/a/a;->a:Lcn/cheln/support/a/b;

    invoke-virtual {v2}, Lcn/cheln/support/a/b;->c()V

    if-eqz p3, :cond_1

    invoke-virtual {p3}, Ljava/lang/String;->trim()Ljava/lang/String;

    move-result-object v2

    const-string v3, "\\|"

    invoke-virtual {v2, v3}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v2

    aget-object v3, v2, v4

    const-string v4, "\\*"

    invoke-virtual {v3, v4}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x0

    array-length v5, v2

    if-le v5, v6, :cond_6

    aget-object v2, v2, v6

    :goto_1
    array-length v4, v3

    if-le v4, v6, :cond_3

    move v4, v6

    :goto_2
    :try_start_0
    array-length v5, v3

    if-ge v4, v5, :cond_3

    iget-object v5, p0, Lcn/cheln/support/a/a;->a:Lcn/cheln/support/a/b;

    aget-object v6, v3, v4

    const/4 v7, 0x0

    invoke-virtual {v5, v6, v7}, Lcn/cheln/support/a/b;->a(Ljava/lang/String;Z)Z

    move-result v5

    if-eqz v5, :cond_2

    add-int/lit8 v5, v4, 0x1

    aget-object v5, v3, v5

    invoke-virtual {v0, v5}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v5

    add-int/lit8 v6, v5, 0x1

    invoke-direct {p0, v1, v5, v6}, Lcn/cheln/support/a/a;->a(Landroid/text/SpannableStringBuilder;II)Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v5

    if-eqz v5, :cond_2

    move-object v0, v1

    goto :goto_0

    :cond_1
    move-object v0, v1

    goto :goto_0

    :cond_2
    add-int/lit8 v4, v4, 0x1

    goto :goto_2

    :catch_0
    move-exception v3

    invoke-virtual {v3}, Ljava/lang/Exception;->printStackTrace()V

    :cond_3
    iget-object v3, p0, Lcn/cheln/support/a/a;->a:Lcn/cheln/support/a/b;

    invoke-virtual {v3}, Lcn/cheln/support/a/b;->c()V

    iget-object v3, p0, Lcn/cheln/support/a/a;->a:Lcn/cheln/support/a/b;

    if-eqz v2, :cond_4

    :goto_3
    invoke-virtual {v3, v0, v2}, Lcn/cheln/support/a/b;->a(Ljava/lang/String;Ljava/lang/String;)Z

    iget-object v2, p0, Lcn/cheln/support/a/a;->a:Lcn/cheln/support/a/b;

    invoke-virtual {v2}, Lcn/cheln/support/a/b;->a()I

    move-result v2

    iget-object v3, p0, Lcn/cheln/support/a/a;->a:Lcn/cheln/support/a/b;

    invoke-virtual {v3}, Lcn/cheln/support/a/b;->b()I

    move-result v3

    invoke-direct {p0, v1, v2, v3}, Lcn/cheln/support/a/a;->a(Landroid/text/SpannableStringBuilder;II)Z

    move-result v2

    if-eqz v2, :cond_5

    move-object v0, v1

    goto :goto_0

    :cond_4
    move-object v2, p3

    goto :goto_3

    :cond_5
    new-instance v1, Landroid/text/SpannableStringBuilder;

    invoke-direct {v1, v0}, Landroid/text/SpannableStringBuilder;-><init>(Ljava/lang/CharSequence;)V

    move-object v0, v1

    goto :goto_0

    :cond_6
    move-object v2, v4

    goto :goto_1
.end method

.method public final a(Lcn/cheln/support/a/b;)V
    .locals 0

    iput-object p1, p0, Lcn/cheln/support/a/a;->a:Lcn/cheln/support/a/b;

    return-void
.end method
